import request from '@/utils/request'
import qs from "qs"
export default {

    // 分页: 根据用户ID来进行查询
    getListByUserIdPage(pageNum, pageSize, growthUserId){
       return request({
           url:'/api-user/growth/listByUserIdPage',
           method:'get',
           params:{
               pageNum,
               pageSize,
               growthUserId
           }
       })
    },
     // 分页: 根据用户ID来进行查询根据成长值来源排序
    getListByOder(pageNum, pageSize, growthUserId, oder){
       return request({
           url:'/api-user/growth/listByOder',
           method:'get',
           params:{
               pageNum, pageSize, growthUserId, oder
           }
       })
    },
    // 分页: 根据用户ID来进行查询根据时间排序
    getListByTime(pageNum, pageSize, growthUserId, oder) {
        return request({
            url: '/api-user/growth/listByTime',
            method: 'get',
            params: {
                pageNum, pageSize, growthUserId, oder
            }
        })
    },

    addManyList(ids,growthChange,growthRemark,type){
        var data = qs.stringify({ ids, growthChange, growthRemark, type});
        return request({

            url: '/api-user/growth/addManyList',
            method: 'post',
            data
        })
    },

    // 筛选
    getListByUserIdPageSelect(pageNum, pageSize, growthUserId, growthSource, growthCreateTime){
        return request({
            url: '/api-user/growth/listByUserIdPageSelect',
            method: 'get',
            params: { pageNum, pageSize, growthUserId, growthSource, growthCreateTime}
        })
    }
}